#define _USE_MATH_DEFINES

#include <cstdio>
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <map>
#include <set>
#include <queue>
#include <cassert>
#include <stack>
#include <cstdlib>
#include <bitset>
#include <cmath>

#define forn(i,n) for (int i = 0; i < int(n); ++i)
#define pb push_back
#define all(a) a.begin(),a.end()
#define sz(a) int(a.size())
#define mp make_pair

using namespace std;

typedef long long li;
typedef long double ld;

typedef pair<int,int> pt;
#define ft first
#define sc second

const int INF = int(1e9);
const li INF64 = li(1e18);
const ld EPS = 1e-9;

//#define TASK_NAME ""

int n, m;

int s, t;

struct edge
{
	int flow, cap, to, back;
};

const int N = 105;

vector<edge> g[N];

void addEdge(int from, int to, int cap)
{
	edge a = {0, cap, to, g[to].size()};
	edge b = {0, 0, from, g[from].size()};
	g[from].pb(a);
	g[to].pb(b);
}


bool read() {
	if (scanf("%d%d", &n, &m) != 2)
		return false;

	forn (i, N)
		g[i].clear();

	if (n == 0 && m == 0)
		return false;

	scanf("%d%d", &s, &t);
	s--, t--;

	forn (i, m)
	{
		int a, b;
		scanf("%d%d", &a, &b);
		a--, b--;
		addEdge(a, b, 1);
	}
	
	return true;
}

void pushFlow(int v, int id)
{
	g[v][id].flow++;
	g[g[v][id].to][g[v][id].back].flow--;
}

bool enlarge(bool ret = false)
{
	queue<int> q;
	vector<pair<int, int> > p(N, mp(-1, -1));

	q.push(s);
	p[s] = mp(s, s);

	while(!q.empty() && p[t].ft == -1)
	{
		int v = q.front();
		q.pop();

		forn (i, g[v].size())
		{
			if (g[v][i].cap - g[v][i].flow <= 0)
				continue;
			int to = g[v][i].to;
			if (p[to].ft == -1)
				q.push(to), p[to] = mp(v, i);
		}
	}

	if (p[t].ft == -1)
		return false;

	if (ret)
		return true;

	int cur = t;
	
	while(cur != s)
	{
		int v = p[cur].ft, i = p[cur].sc;
		pushFlow(v, i);
		cur = v;
	}

	return true;
}

void rev(int v, int i)
{
	int to = g[v][i].to;
	int j = g[v][i].back;

	swap(g[v][i].flow, g[to][j].flow); 
	swap(g[v][i].cap, g[to][j].cap); 
}

void solve() {

	int flow = 0;

	while(enlarge())
		flow++;

	int maxFlow = flow;
	int ans = 0;

	forn (i, N)
		forn (j, g[i].size())
		{
			if (g[i][j].flow == 0 && g[i][j].cap == 1)
			{
				rev(i, j);
				if (enlarge(true))
				{
					ans++;
					maxFlow = flow + 1;
				}
				rev(i, j);
			}
		}
	cout << maxFlow << ' ' << ans << endl;
}

int main() {
#ifdef TASK_NAME
	freopen(TASK_NAME ".in", "r", stdin);
	freopen(TASK_NAME ".out", "w", stdout);
#endif

#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif

	while (read())
		solve();

	return 0;
}